import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: (resolve) => {
        require(['@/views/home'], resolve)
      }
    },
    {
      path: '/button',
      name: 'button',
      component: (resolve) => {
        require(['@/views/button'], resolve)
      }
    },
    {
      path: '/icon',
      name: 'icon',
      component: (resolve) => {
        require(['@/views/icon'], resolve)
      }
    },
    {
      path: '/row',
      name: 'row',
      component: (resolve) => {
        require(['@/views/row'], resolve)
      }
    },
    {
      path: '/layout',
      name: 'layout',
      component: (resolve) => {
        require(['@/views/layout'], resolve)
      }
    },
    {
      path: '/*',
      name: 'index',
      component: (resolve) => {
        require(['@/views/home'], resolve)
      }
    }
  ]
})
